﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.ApplicationModel.Bootstrap.Extensibility;
using System.Linq.Expressions;

namespace YasharEl.Infrastructure.ApplicationModel.Bootstrap.Syntax
{
    /// <summary>
    /// Execute an action on an extension syntax.
    /// </summary>
    /// <typeparam name="TExtension">The type of the extension.</typeparam>
    public interface IExecuteActionOnExtension<TExtension> : ISyntax<TExtension>
        where TExtension : IBootstrappingExtension
    {
        /// <summary>
        /// Adds an execution action which operates on the extension to the
        /// currently built syntax.
        /// </summary>
        /// <param name="action">The action.</param>
        /// <returns>The current syntax builder.</returns>
        IWithBehavior<TExtension> Execute(Expression<Action<TExtension>> action);
    }
}
